<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//ZH-CN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="imagetoolbar" content="no" />
	<title>Class UI.SpinnerField</title>
	<link href="../resources/API_Help.css" type="text/css" rel="stylesheet" />
</head>

<body>
<!--打印本页-->
<div class="printCurrentPage">
	<img src="../resources/image/print.gif" align="absmiddle" />&nbsp;
	<a href="ui_SpinnerField_API.html" target="_blank">打印本页</a>
</div><br/>

<!--标题说明-->
<h1>Class UI.SpinnerField</h1>
<b>定义于文件：</b>&nbsp;&nbsp;webui.js
<div class="description">将页面对象渲染成微调框控件。</div><br/>
<b>基本语法</b>
<div class="syntax">var spinnerField = new <b>UI.SpinnerField</b>( { &lt; <em>id:String|Tag</em>,&nbsp;&nbsp;<em>name:String</em> &gt; [ , <em>width:Number</em>,&nbsp;&nbsp;<em>value:Number</em>,&nbsp;&nbsp;<em>minValue:Number</em>,&nbsp;&nbsp;<em>maxValue:Number</em>,&nbsp;&nbsp;<em>step:Number</em> ] } );</div>
<b>参数说明</b>
<div class="parameter">
	<ul>
		<li><em>id</em> : String|Tag</li>
		<div class="subDesc">页面微调框标签ID或是页面微调框标签对象。</div>
		<li><em>name</em> : String</li>
		<div class="subDesc">微调框的名字, 提交时, 后台通过微调框的名字取得微调框的值, 默认值：id。</div>
		<li><em>width</em> : Number</li>
		<div class="subDesc">(可选参数) 微调框的宽度, 默认值：160px。</div>
		<li><em>value</em> : Number</li>
		<div class="subDesc">(可选参数) 微调框的默认值, 默认值：0。</div>
		<li><em>minValue</em> : Number</li>
		<div class="subDesc">(可选参数) 微调框可调整的最小值, 默认值：0。</div>
		<li><em>maxValue</em> : Number</li>
		<div class="subDesc">(可选参数) 微调框可调整的最大值, 默认值：99999999。</div>
		<li><em>step</em> : Number</li>
		<div class="subDesc">(可选参数) 微调框的调整步长，整型, 默认值：1。</div>
	</ul>
</div>
<b>页面标签对象原型</b>
<div class="parameter">
	&lt;input type="text" /&gt;
</div>
<b>依赖关系</b>
<div class="parameter">
	<a href="core_API.html">core.js</a>
</div><br/>
<a href="#properties">相关属性</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#methods">相关方法</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#events">相关事件</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#examples">应用示例</a>
<hr>

<!--相关属性-->
<a name="properties"></a>
<h2>相关属性</h2>
<table width="100%" cellspacing="0">
	<tbody>
		<tr>
			<td class="tableHead" width="83%">所有属性</td>
			<td class="tableHead" width="17%">所属类</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#UI.SpinnerField.dom" class="methodLink">UI.SpinnerField.dom</a>&nbsp;:&nbsp;&lt;div&gt;<br/>
				微调框控件的页面容器标签对象。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#UI.SpinnerField.max" class="methodLink">UI.SpinnerField.max</a>&nbsp;:&nbsp;Number<br/>
				设置或返回控件可调整范围的最大值。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#UI.SpinnerField.min" class="methodLink">UI.SpinnerField.min</a>&nbsp;:&nbsp;Number<br/>
				设置或返回控件可调整范围的最小值。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#UI.SpinnerField.step" class="methodLink">UI.SpinnerField.step</a>&nbsp;:&nbsp;Number<br/>
				设置或返回控件的调整步长值。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
	</tbody>
</table>

<!--相关方法-->
<a name="methods"></a>
<h2>相关方法</h2>
<table width="100%" cellspacing="0">
	<tbody>
		<tr>
			<td class="tableHead" width="83%">所有方法</td>
			<td class="tableHead" width="17%">所属类</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#autoSize" class="methodLink">autoSize</a>()&nbsp;:&nbsp;none<br/>
				使微调框自动适应容器尺寸。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#disable" class="methodLink">disable</a>( <em>disable:boolean</em> )&nbsp;:&nbsp;none<br/>
				设置微调框是否可用。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#editable" class="methodLink">editable</a>( <em>editable:boolean</em> )&nbsp;:&nbsp;none<br/>
				设置微调框是否可编辑。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#focus" class="methodLink">focus</a>()&nbsp;:&nbsp;none<br/>
				使微调框获得焦点。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#getValue" class="methodLink">getValue</a>()&nbsp;:&nbsp;Number<br/>
				返回微调框的值。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#onAdjust" class="methodLink">onAdjust</a>( <em>callBack:Function</em>,&nbsp;&nbsp;<em>time:Number</em> )&nbsp;:&nbsp;none<br/>
				设置微调框调整动作事件回调。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#reset" class="methodLink">reset</a>()&nbsp;:&nbsp;none<br/>
				复位微调框。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#setValue" class="methodLink">setValue</a>( <em>value:Number</em> )&nbsp;:&nbsp;none<br/>
				设置微调框的值。
			</td><td class="tableLineRight alt">UI.SpinnerField</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#setWidth" class="methodLink">setWidth</a>( <em>width:Number</em> )&nbsp;:&nbsp;none<br/>
				设置微调框的宽度。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
	</tbody>
</table>

<!--相关事件-->
<a name="events"></a>
<h2>相关事件</h2>
<table width="100%" cellspacing="0">
	<tbody>
		<tr>
			<td class="tableHead" width="83%">所有事件</td>
			<td class="tableHead" width="17%">所属类</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#UI.SpinnerField.onAdjustEvent" class="methodLink">UI.SpinnerField.onAdjustEvent</a>&nbsp;:&nbsp;Function<br/>
				微调框控件的调整动作事件。
			</td><td class="tableLineRight">UI.SpinnerField</td>
		</tr>
	</tbody>
</table>
<br/>

<hr>

<!--相关属性的详细说明-->
<h2>本类属性的详细说明</h2>
<div class="detailWrap">

<a name="UI.SpinnerField.dom"></a>
<div class="mdetail">
	<h3>UI.SpinnerField.dom</h3><br/>
	<div class="mdetailDetails">
		微调框控件的页面容器标签对象。<br/>
		通过 dom 属性可直接对微调框进行操作。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="UI.SpinnerField.max"></a>
<div class="mdetail alt">
	<h3>UI.SpinnerField.max</h3><br/>
	<div class="mdetailDetails">
		设置或返回控件可调整范围的最大值。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="UI.SpinnerField.min"></a>
<div class="mdetail">
	<h3>UI.SpinnerField.min</h3><br/>
	<div class="mdetailDetails">
		设置或返回控件可调整范围的最小值。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="UI.SpinnerField.step"></a>
<div class="mdetail alt">
	<h3>UI.SpinnerField.step</h3><br/>
	<div class="mdetailDetails">
		设置或返回控件的调整步长值。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

</div><br/>

<!--相关方法的详细说明-->
<h2>本类方法的详细说明</h2>
<div class="detailWrap">

<a name="autoSize"></a>
<div class="mdetail">
	<h3>autoSize</h3>
	<div class="functionDefine">public function autoSize()</div>
	<div class="mdetailDetails">
		使微调框自动适应容器尺寸。<br/>
		如果想控件适应的更加准确, 请将页面标签对象放入一个空的&lt;div&gt;&lt;/div&gt;中。
	</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul><li>无</li></ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="disable"></a>
<div class="mdetail alt">
	<h3>disable</h3>
	<div class="functionDefine">public function disable( disable:boolean )</div>
	<div class="mdetailDetails">
		设置微调框是否可用。
	</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>disable</em> : boolean</li>
			<div class="subDesc">参数的取值&nbsp;&nbsp;&nbsp;&nbsp;true: 不可用, false: 可用。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="editable"></a>
<div class="mdetail">
	<h3>editable</h3>
	<div class="functionDefine">public function editable( editable:boolean )</div>
	<div class="mdetailDetails">
		设置微调框是否可编辑。
	</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>editable</em> : boolean</li>
			<div class="subDesc">参数的取值&nbsp;&nbsp;&nbsp;&nbsp;true: 可编辑, false: 不可编辑。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="focus"></a>
<div class="mdetail alt">
	<h3>focus</h3>
	<div class="functionDefine">public function focus()</div>
	<div class="mdetailDetails">使微调框获得焦点。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul><li>无</li></ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="getValue"></a>
<div class="mdetail">
	<h3>getValue</h3>
	<div class="functionDefine">public function getValue()</div>
	<div class="mdetailDetails">返回微调框的值。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul><li>无</li></ul>
		<b>返回值</b>
		<ul><li>Number</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="onAdjust"></a>
<div class="mdetail alt">
	<h3>onAdjust</h3>
	<div class="functionDefine">public function onAdjust( callBack:Function, time:String )</div>
	<div class="mdetailDetails">设置微调框的 onAdjustEvent 动作事件回调。<br/>
	当事件触发时, 系统会自动调用 callBack 方法。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>callBack</em> : Function</li>
			<div class="subDesc">回调函数名。</div>
			<li><em>time</em> : String</li>
			<div class="subDesc">延时调用的时间, 默认值：0, 单位: 毫秒。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="reset"></a>
<div class="mdetail">
	<h3>reset</h3>
	<div class="functionDefine">public function reset()</div>
	<div class="mdetailDetails">复位微调框为默认值。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul><li>无</li></ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="setValue"></a>
<div class="mdetail alt">
	<h3>setValue</h3>
	<div class="functionDefine">public function setValue( value:Number )</div>
	<div class="mdetailDetails">设置微调框的值。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>value</em> : Number</li>
			<div class="subDesc">整型数值。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

<a name="setWidth"></a>
<div class="mdetail">
	<h3>setWidth</h3>
	<div class="functionDefine">public function setWidth( width:Number )</div>
	<div class="mdetailDetails">设置微调框的宽度。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>width</em> : Number</li>
			<div class="subDesc">微调框的宽度, 默认值: 160px。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

</div><br/>

<!--相关事件的详细说明-->
<h2>本类事件的详细说明</h2>
<div class="detailWrap">

<a name="UI.SpinnerField.onAdjustEvent"></a>
<div class="mdetail">
	<h3>UI.SpinnerField.onAdjustEvent</h3><br/>
	<div class="mdetailDetails">
		微调框调整动作事件。<br/>
		在使用调整键改变微调框值的时候将会触发此事件, 具体的应用请参见方法 <a href="#onAdjust" class="methodLink">onAdjust</a> 的说明。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_SpinnerField_API.html">Return</a></div><br/>
</div>

</div><br/>

<!--应用示例-->
<a name="examples"></a>
<h2>应用示例</h2>
<div class="properties"><a href="../Example/ui_SpinnerField.html" target="_blank">ui_SpinnerField.html</a></div><br/>

<!--页脚-->
<hr>
<div class="footer">JSR - Copyright &copy; 2007-2008 Jsr JS, LLC<br/>All rights reserved.</div>
</body>
</html>
